<div class="header py-4">
    <div class="container">
        <div class="d-flex">
        <a class="header-brand" href="{{ url_for('main.home') }}">
            <img src="{{ url_for('static', filename='public/ignite/ignite-logo@2x.png') }}" class="header-brand-img" alt="tabler logo">
        </a>
        <div class="d-flex order-lg-2 ml-auto">
            <div class="nav-item d-none d-md-flex">
                <a href="mailto://{{ constants.SUPPORT_EMAIL }}" class="btn btn-sm btn-outline-primary" target="_blank">Get help</a>
            </div>
            {% if current_user.is_authenticated %}
                <div class="dropdown">
                    <a href="#" class="nav-link pr-0 leading-none" data-toggle="dropdown">
                        <span class="avatar avatar-placeholder"></span>
                        <span class="ml-2 d-none d-lg-block">
                        {% if current_user.full_name %}
                            <span class="text-default">{{ current_user.full_name }}</span>
                            <small class="text-muted d-block mt-1">{{ current_user.email }}</small>
                        {% else %}
                            <span class="text-default">{{ current_user.email }}</span>
                        {% endif %}
                        </span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
                        {% for membership in current_user.memberships %}
                            <a href="{{ url_for('dashboard_home.home', team_id=membership.team.id) }}" class="dropdown-item">
                                <i class="dropdown-icon fe fe-log-in"></i>  {{ membership.team.name }} Dashboard
                            </a>
                            <div class="dropdown-divider"></div>
                        {% endfor %}
                        <a class="dropdown-item" href="{{ url_for('user_settings.account') }}">
                            <i class="dropdown-icon fe fe-settings"></i> Account Settings
                        </a>

                        <a class="dropdown-item" href="mailto://{{ constants.SUPPORT_EMAIL }}">
                            <i class="dropdown-icon fe fe-help-circle"></i> Need help?
                        </a>
                        <a class="dropdown-item" href="{{ url_for('auth.logout') }}">
                            <i class="dropdown-icon fe fe-log-out"></i> Sign out
                        </a>
                    </div>
                </div>
            {% else %}
            <div class="nav-item d-none d-md-flex">
                <a class="btn btn-sm btn-outline-primary" href="{{ url_for('auth.login') }}">Login</a>
            </div>
            {% endif %}
        </div>
        <a href="#" class="header-toggler d-lg-none ml-3 ml-lg-0" data-toggle="collapse" data-target="#headerMenuCollapse">
            <span class="header-toggler-icon"></span>
        </a>
        </div>
    </div>
</div>